home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / formats / vicar2.txt < prev    next >
Internet Message Format  |  1991-06-26  |  15KB

  1. From baalke@kelvin.jpl.nasa.gov Thu Jun 27 16:17:48 1991
  2. From: baalke@kelvin.jpl.nasa.gov (Ron Baalke)
  3. Newsgroups: comp.graphics
  4. Subject: VICAR
  5. Keywords: VICAR, JPL
  6. Date: 26 Jun 91 13:44:38 GMT
  7. Reply-To: baalke@kelvin.jpl.nasa.gov
  8. Organization: Jet Propulsion Laboratory
  9. News-Software: VAX/VMS VNEWS 1.3-4
  10. Nntp-Posting-Host: kelvin.jpl.nasa.gov
  11.  
  12.  
  13.      At then end of this posting is a detailed description of the VICAR format
  14. used by the Image Processing Lab at JPL.  This will give people the ability to
  15. write software on other computer platforms to read and display VICAR images,
  16. like the Magellan images I've recently uploaded to Ames.
  17.  
  18.      Also, I've compiled a list of software that will currently display images
  19. in the VICAR format.  If you know of any other programs that should be on the
  20. list, then let me know, and I'll maintain an updated list.
  21.  
  22.      o VICAR (VAX/VMS).
  23.  
  24.        The image processing program used at JPL.  Has been under continuous
  25.        development since the 1960's.  Available from the Computer Software
  26.        Management and Information Center (COSMIC) for $4000 and requires a
  27.        license agreement.  Contact COSMIC at the following for more details:
  28.  
  29.             COSMIC
  30.             The University of Georgia
  31.             382 East Broad Street
  32.             Athens, GA  30602
  33.  
  34.             Telephone: (404) 542-3265
  35.  
  36.             Email: cosmic@uga.bitnet (bitnet)
  37.                    service@cossack.cosmic.uga.edu (internet)
  38.  
  39.      o IMDISP (IBM PC).
  40.  
  41.        Written by myself and Mike Martin at JPL, and Archie Warnock at Goddard
  42.        Space Flight Center.  Available via anonymous ftp at ames.arc.nasa.gov
  43.        [128.102.18.3] in the pub/SPACE/SOFTWARE directory, under the file
  44.        imdisp56.zip.  IMDISP is on the GRIPS 2 CDROM, and can also be obtained
  45.        free from the National Space Science Data Center (NSSDC) at the Goddard
  46.        Space Flight Center:
  47.  
  48.             National Space Science Data Center
  49.             Request Coordination Office
  50.             Goddard Space Flight Center
  51.             Code 633
  52.             Greenbelt, MD  20771
  53.  
  54.             Telephone: (301) 286-6695
  55.  
  56.             Email address:   request@nssdca.gsfc.nasa.gov
  57.  
  58.        Incidently, this is also the same place you can get the Voyager and
  59.        Magellan CDROMs.
  60.  
  61.      o PixelPusher (Macintosh).
  62.  
  63.        Written by Dan Stanfill at JPL.  Available on the GRIPS 2 CDROM, and I'm
  64.        working on making it available via anonymous ftp.
  65.  
  66.      o xloadimage (Sun).
  67.  
  68.        Written by Herr Frost.  Available via anonymous ftp at
  69.        export.lcs.mit.edu [18.30.0.238] in the contrib directory.  The patches
  70.        to support VICAR are in a separate file at convex.com [130.168.1.1] and
  71.        are in pub/xl.3.0.1.patches.Z.  Anthony Datri wrote the VICAR patches.
  72.  
  73.                          *************
  74.       ___    _____     ___
  75.      /_ /|  /____/ \  /_ /|     Ron Baalke         | baalke@kelvin.jpl.nasa.gov
  76.      | | | |  __ \ /| | | |     Jet Propulsion Lab |
  77.   ___| | | | |__) |/  | | |__   M/S 301-355        | "Imagination is more
  78.  /___| | | |  ___/    | |/__ /| Pasadena, CA 91109 | important than knowledge"
  79.  |_____|/  |_|/       |_____|/                     | Albert Einstein
  80.  
  81. ===========================================================================
  82.  
  83.                        VICAR2 IMAGE FILE FORMAT
  84.  
  85.  
  86. 1  Introduction
  87.  
  88.     This document describes the format of a simple two-dimensional
  89. VICAR2 image and the attached label.
  90.  
  91. 2  VICAR2 File Format
  92.  
  93.     A VICAR2 image file in its simplest form is a file with fixed-length
  94. records containing binary data and an ASCII label.  The label takes up
  95. one or more records at the beginning of the file, and is further
  96. described in section 3 below.  The image data begins on the next record
  97. boundary after the label.   There is one record per image line, and the
  98. number of bytes in a record is equal to the number of bytes in one image
  99. line.  The image data can be any one of the following data types,
  100. indicated by a keyword in the image label:
  101.  
  102.         BYTE:    8 bits = VAX byte
  103.         HALF:    16 bits = 2 bytes = VAX word = Fortran INTEGER*2
  104.         FULL:    32 bits = 4 bytes = VAX longword = Fortran INTEGER*4
  105.         REAL:    32 bits = 4 bytes = VAX longword = Fortran REAL*4
  106.         DOUB:    64 bits = 8 bytes = VAX quadword = Fortran REAL*8
  107.         COMPLEX: 64 bits = 8 bytes = VAX quadword = Fortran COMPLEX*8
  108.  
  109. 3  VICAR2 Label Format
  110.  
  111.     The VICAR2 label is in the form of an ASCII character string,
  112. beginning at the first byte in the first record in the file.  The label
  113. may take up one or more records at the beginning of the file.  If the
  114. character string does not completely fill the final label record, the
  115. remaining bytes in the record are set to the ASCII null value,
  116. hexadecimal 00.
  117.  
  118.     In some cases there may be an additional label record at the end of
  119. the file, following the image data.  This is indicated when the keyword
  120. EOL has the value 1 (see description of keywords below).
  121.  
  122. 3.1  The Keyword=Value Format
  123.  
  124.     The label uses the KEYWORD=VALUE format for storing information
  125. about the image.  A list of standard keywords is given in section 3.3.
  126. The maximum length of a keyword is 8 characters.  A keyword is written
  127. in all capital letters and is followed by an equals sign (=), which is
  128. in turn followed by the value for the keyword.  There are no spaces on
  129. either side of the equals sign.  The value is followed by one or more
  130. spaces, in order to separate one KEYWORD=VALUE pair from the next.  Here
  131. is an example of one label item following another:
  132.  
  133.         RECSIZE=1024  NL=1324
  134.  
  135.     A keyword value may be one of four data types:
  136.  
  137.         INTEGER         A positive or negative integer including 0 which
  138.                         does not contain a decimal point.
  139.         REAL            A positive or negative number with a decimal
  140.                         point and, optionally, an exponential (E+06, for
  141.                         instance).
  142.         DOUBLE          A real number with enough digits to make it
  143.                         double-precision.
  144.         STRING          A string delimited by single quotation marks (')
  145.                         containing any printable ASCII characters and
  146.                         spaces EXCEPT the single quotation mark.  The
  147.                         maximum length of a string is 512 characters,
  148.                         and the minimum length is 1 character.
  149.  
  150.     The first keyword in the label is always LBLSIZE, which specifies
  151. the total number of bytes in the label, including any null bytes at the
  152. end.  Thus LBLSIZE will always be a multiple of the file's record size.
  153.  
  154. 3.2  Two Parts of a VICAR2 Label
  155.  
  156.     A label has two sections, the system label items and the history
  157. label items.  History label items are added to the label during
  158. processing with VICAR software.  It is possible for a label to contain
  159. no history label items.  If history label items do exist, they always
  160. occur at the end of the label, following the last system label item.
  161. The beginning of the history label section is marked by the occurrence
  162. of the keyword TASK.
  163.  
  164.     Thus, the system section of the label begins with the keyword
  165. LBLSIZE, and ends in one of these three ways:
  166.  
  167.     o with the appearance of the keyword TASK, which marks the
  168.       beginning of the history section of the label, OR
  169.  
  170.     o with the appearance of an ASCII null value, hexadecimal 00, which
  171.       marks the end of the VICAR2 label (in which case there are no history
  172.       label items), OR
  173.  
  174.     o after the number of characters specified by LBLSIZE (in which
  175.       case there are no history label items).
  176.  
  177. 3.3  Standard Label Keywords
  178.  
  179.     Here is a table of standard VICAR2 label keywords, divided into
  180. system label items and history label items.  Those marked with an
  181. asterisk (*) are required to be present in order for the VICAR image
  182. processing software to be able to process the label.  LBLSIZE will
  183. always be the first keyword in the label.  The other system keywords may
  184. follow in any order.
  185.  
  186.                     STANDARD VICAR2 LABEL KEYWORDS
  187.  
  188.                           SYSTEM LABEL ITEMS
  189.  
  190.       KEYWORD        TYPE         MEANING
  191.  
  192.       LBLSIZE*       integer      The length in bytes of the VICAR
  193.                                   label, including null bytes at the
  194.                                   end.
  195.  
  196.       BUFSIZE*       integer      The default blocksize used when the
  197.                                   file is written to tape.
  198.  
  199.  
  200.       DIM            integer      The dimension of the file (for flat
  201.                                   files, always 2).
  202.  
  203.       EOL            integer      EOL=1 indicates that an end-of-file
  204.                                   label exists.  In most cases EOL=0;
  205.                                   i.e., there is no end-of-file label.
  206.  
  207.       FORMAT*        character    The data type of a sample.  Valid
  208.                                   values are: BYTE, HALF (16-bit
  209.                                   integer), FULL (32-bit integer), REAL
  210.                                   (32-bit floating-point), DOUB (64-bit
  211.                                   floating-point) and COMPLEX (2 32-bit
  212.                                   floating-points).
  213.  
  214.       HOST           character    Type of host computer.  The only
  215.                                   current legal value is 'VAX-VMS'.
  216.  
  217.       INTFMT         character    The integer format for the file.  The
  218.                                   only current legal value is 'LOW'.
  219.  
  220.       N1             integer      Same as NL for simple files.
  221.  
  222.       N2             integer      Same as NS for simple files.
  223.  
  224.       N3             integer      Same as NB for simple files.
  225.  
  226.       N4             integer      Always 0 for simple files.
  227.  
  228.       NB             integer      The number of bands.  For simple
  229.                                   files, always 1.
  230.  
  231.       NBB            integer      Number of bytes in the binary prefix
  232.                                   to each line.  Always 0 for simple
  233.                                   files.
  234.  
  235.       NL*            integer      The number of lines in the image.
  236.  
  237.       NLB            integer      The number of lines of binary header.
  238.                                   Always 0 for simple files.
  239.  
  240.       NS*            integer      The number of samples per image line.
  241.  
  242.       ORG            character    The organization of the file.  For
  243.                                   simple files this is always BSQ (band
  244.                                   sequential).
  245.  
  246.       REALFMT        character    The real format for the file.  The
  247.                                   only current legal value is 'VAX'.
  248.  
  249.       RECSIZE*       integer      The number of bytes per record; i.e.,
  250.                                   NS*LEN, where LEN is the number of
  251.                                   bytes per sample as follows:
  252.  
  253.                                      FORMAT:         LEN:
  254.                                      BYTE              1
  255.                                      HALF              2
  256.                                      REAL,FULL         4
  257.                                      DOUB,COMPLEX      8
  258.  
  259.  
  260.                           HISTORY LABEL ITEMS
  261.  
  262.       KEYWORD        TYPE         MEANING
  263.  
  264.       DAT_TIM        character    The date and time the program was run.
  265.                                   The format is DOW MON DD HH:MM:SS
  266.                                   YYYY, where
  267.  
  268.                                      DOW = day of week (Mon, Tue, Wed,
  269.                                      etc.),
  270.                                      MON = month (Jan, Feb, Mar, etc.),
  271.                                      DD = day of month,
  272.                                      HH:MM:SS = hours, minutes, seconds,
  273.                                      YYYY = year.
  274.  
  275.                                   An example of a date and time in this
  276.                                   format is 'Mon Jan 11 21:51:55 1990'.
  277.  
  278.       TASK           character    The name of a VICAR program that has
  279.                                   processed the file's data.
  280.  
  281.       USER           character    The identifier of the user that
  282.                                   invoked the program represented by the
  283.                                   preceding TASK keyword.
  284.  
  285.       The history label section may also contain other keywords that are
  286. specific to the program that was run.  These are sometimes called user
  287. labels.  They are informational only; they are not interpreted by VICAR
  288. software, but they are copied from input file to output file with the
  289. other label keywords.
  290.                         *******************
  291.  
  292. From charliep@hpcvra.cv.hp.com. Thu Jun 27 16:18:19 1991
  293. From: charliep@hpcvra.cv.hp.com. (Charles Patton)
  294. Newsgroups: comp.graphics
  295. Subject: Re: VICAR
  296. Date: 27 Jun 91 01:52:45 GMT
  297. Organization: Hewlett-Packard Co., Corvallis, OR, USA
  298.  
  299. For Mac users:
  300.  
  301. I have found that NCSA Image does a beautiful job displaying the
  302. VICAR images with no special preparation other than noting the
  303. height and width (given in human readable form at the start of
  304. the file.) I highly recommend it for this purpose.
  305.  
  306. A Public Thank You:
  307.  
  308. I wish to thank Ron Baalke for making the Magellan images available.
  309. These truly spectacular images have strongly rekindled my interest both
  310. in digital image processing and in planetary imaging. Having watched the
  311. Voyager Jupiter encounter with the Stony Brook group, and the Saturn
  312. encounter from the Hansen planetarium, I was shocked to note how interest
  313. has flagged over the intervening years. I'm sure that these images with
  314. serve to stir both the scientific and general public interest in 
  315. planetary imaging missions.
  316.  
  317. In addition to all these, the Magellan images serve as ideal test cases
  318. for inverse-Muhlemann-shading (shade-to-shape) experiments.
  319. Thanks again.
  320.    Charlie Patton
  321. *******************************************************
  322. ** Charles M. Patton                                 **
  323. **                                                   **
  324. ** charliep@cv.hp.com                                **
  325. **      the usual disclaimers apply                  **
  326. *******************************************************
  327.  
  328. From datri@convex.com Thu Jun 27 16:20:35 1991
  329. From: datri@convex.com (Anthony A. Datri)
  330. Newsgroups: alt.graphics.pixutils
  331. Subject: Re: VICAR
  332. Keywords: VICAR, JPL
  333. Date: 27 Jun 91 01:28:42 GMT
  334. Organization: CONVEX Computer Corporation, Richardson, Tx., USA
  335. Nntp-Posting-Host: beak.convex.com
  336.  
  337. >     o xloadimage (Sun).
  338.  
  339. Anything reasonable that has X libraries, really.
  340.  
  341. >       Written by Herr Frost.
  342.  
  343. Herr's a title that I gave in a mail message.  Jim's his name, and xloadimage
  344. is a fine piece of work for which he deserves much credit.  My additions are
  345. largely a peopen() and a bunch of strstr() calls 8^).
  346.  
  347. The patches in the mentioned archive are a little raw -- Jim should merging
  348. them in [the important ones, at least] in an upcoming release.  That archive
  349. also includes a slightly modified copy of the uncompression program from
  350. the Voyager CD-ROMs.  Xloadimage will use that program to filter a Huffman-
  351. encoded PDS file, as found on the Voyager CD's, to a straight VICAR file,
  352. which it then interprets.
  353.  
  354. Rawtopgm, from the pbmplus suite, can digest VICAR files when fed the
  355. appropriate arguments.
  356.  
  357. --
  358.  
  359.  
  360. Use your wheels: that is what they are for.
  361. datri@convex.com
  362.  
  363.